Incremental copying garbage collection for WAM-based Prolog systems
نویسندگان
چکیده
We present an incremental copying garbage collector for the heap in WAM-based Prolog systems. We describe a heap layout in which the heap is divided in a number of equal-sized blocks. Other changes to the standard WAM allow to garbage collect these blocks independently from each other. Independent collection of heap blocks is the basis of our incremental algorithm. Compared to other copying collectors for Prolog, this collector has several advantages. First of all, it reduces pause times by only collecting one heap block at a time. Second, our algorithm has in many cases a lower memory usage than standard semi-space copying collectors. Our algorithm is based on copying without marking (contrary to the more frequently used markcopy algorithms in the context of Prolog); but while usually a copying collector needs a to space as big as the size of its from space, our collector needs a to space only the size of one heap block. Another benefit is that this algorithm also allows for a variety of garbage collection policies (including generational ones).
منابع مشابه
Copying garbage collection for WAM-based prolog systems
High-level programming languages like Prolog free the programmer from the burden of explicit memory management. In Prolog, dynamic memory allocation is done implicitly by creating data structures. The deallocation of data structures which are no longer in use, is the responsibility of the run-time system. Many Prolog implementations are based on the Warren Abstract Machine (WAM), a virtual mach...
متن کاملHeap Memory Management in Prolog with Tabling: Principles and Practice
We address memory management aspects of WAM-based logic programming systems that support tabled evaluation through the use of a suspension/resumption mechanism. We describe the memory organization and usefulness logic of such systems, and issues that have to be resolved for effective and efficient garbage collection. Special attention is given to early reset in the context of suspended computat...
متن کاملGarbage Collection for Prolog based on Twin Cells
A garbage collection algorithm for a WAM-based Prolog system is presented. It uses a classical mark-and-compact approach, but requires less passes through the data areas than previous algorithms. It is applicable when the smallest garbage-collectable entity occupies an amount of space which is suucient to store two pointers plus 2 bits with each pointer. This collector has been implemented in t...
متن کاملOn Enabling the WAM with Region Support
Region-based memory management is an attractive alternative to garbage collection. It relies on a compile-time analysis to annotate the program with explicit allocation and deallocation instructions, where lifetimes of memory objects are grouped together in regions. This paper investigates how to adapt the runtime part of region-based memory management to the WAM setting. We present additions t...
متن کاملProceedings of the Workshop on Parallelism and Implementation Technologies for (Constraint) Logic Programming Languages
Incremental stack-copying was used to implement OR-parallel Prolog efficiently in the MUSE system. The idea of incremental stack-copying is to only copy the difference between the WAM data areas of two processors, instead of copying them entirely. In order to further reduce the communication during stack-copying and make its implementation efficient on distributed memory machines, a new techniq...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- TPLP
دوره 7 شماره
صفحات -
تاریخ انتشار 2007